#include <cstdio>
#include <algorithm>

/**
 * 时间复杂度：O(n)
 * 空间复杂度：O(1)
 * 
 * 合并数组并反转
 * @return 
 */
int main() {
    int a[110]{}, b[110]{}, c[220]{};

    int n, x, y, len = 0;
    scanf("%d", &n);


    for (int i = 0; i < n; i++) {
        scanf("%d", &a[i]);
    }
    for (int i = 0; i < n; i++) {
        scanf("%d", &b[i]);
    }

    for (int i = 0; i < n; i++) {
        c[len++] = a[i];
        c[len++] = b[i];
    }

    scanf("%d %d", &x, &y);

    int leftIndex = x - 1;
    int rightIndex = y - 1;
    while (leftIndex < rightIndex) {
        std::swap(c[leftIndex], c[rightIndex]);
        leftIndex++;
        rightIndex--;
        
    }

    for (int i = 0; i < len; i++) {
        printf("%d ", c[i]);
    }
    return 0;
}